inherited fmJLAddEdit: TfmJLAddEdit
  Left = 492
  Top = 239
  Width = 770
  Height = 500
  Caption = 'fmJLAddEdit'
  Constraints.MinHeight = 500
  Constraints.MinWidth = 770
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel [0]
    Left = 103
    Top = 86
    Width = 23
    Height = 13
    Caption = #1054#1055#1060
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label3: TLabel [1]
    Left = 385
    Top = 320
    Width = 67
    Height = 13
    Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label2: TLabel [2]
    Left = 7
    Top = 134
    Width = 91
    Height = 13
    Caption = #1070#1088#1080#1076#1080#1095#1077#1089#1082#1086#1077' '#1080#1084#1103
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label4: TLabel [3]
    Left = 7
    Top = 186
    Width = 103
    Height = 13
    Caption = #1070#1088#1080#1076#1080#1095#1077#1089#1082#1080#1081' '#1072#1076#1088#1077#1089
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label5: TLabel [4]
    Left = 7
    Top = 307
    Width = 21
    Height = 13
    Caption = #1048#1053#1053
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label6: TLabel [5]
    Left = 7
    Top = 371
    Width = 27
    Height = 13
    Caption = #1054#1043#1056#1053
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label7: TLabel [6]
    Left = 385
    Top = 57
    Width = 73
    Height = 13
    Caption = #1056#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1100
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  object Label8: TLabel [7]
    Left = 385
    Top = 112
    Width = 95
    Height = 13
    Caption = #1055#1088#1080#1074#1103#1079#1082#1072' '#1082' '#1075#1088#1091#1087#1087#1077
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
  end
  inherited sbBottom: TStatusBar
    Top = 435
    Width = 754
  end
  inherited Panel1: TPanel
    Width = 754
    inherited BitBtn1: TBitBtn
      Left = 592
    end
    inherited BitBtn2: TBitBtn
      Left = 680
    end
  end
  object edOPF: TcxDBTextEdit [10]
    Left = 7
    Top = 102
    DataBinding.DataField = 'JLOPF'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Properties.ReadOnly = True
    Style.Color = clMoneyGreen
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 2
    Width = 79
  end
  object cxDBMemo1: TcxDBMemo [11]
    Left = 7
    Top = 205
    DataBinding.DataField = 'JLLEGALADRESS'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.TextStyle = []
    Style.IsFontAssigned = True
    TabOrder = 3
    Height = 89
    Width = 362
  end
  object cxDBTextEdit1: TcxDBTextEdit [12]
    Left = 7
    Top = 150
    DataBinding.DataField = 'JLEGALNAME'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 4
    OnExit = cxDBTextEdit1Exit
    Width = 360
  end
  object cxDBTextEdit3: TcxDBTextEdit [13]
    Left = 7
    Top = 323
    DataBinding.DataField = 'JLINN'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 5
    OnExit = cxDBTextEdit3Exit
    Width = 226
  end
  object cxDBTextEdit4: TcxDBTextEdit [14]
    Left = 7
    Top = 387
    DataBinding.DataField = 'JLOGRN'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 6
    Width = 226
  end
  object cxDBTextEdit5: TcxDBTextEdit [15]
    Left = 385
    Top = 73
    DataBinding.DataField = 'JLCEONAME'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 7
    Width = 362
  end
  object cxDBMemo2: TcxDBMemo [16]
    Left = 385
    Top = 339
    DataBinding.DataField = 'JLNOTE'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.TextStyle = []
    Style.IsFontAssigned = True
    TabOrder = 8
    Height = 89
    Width = 362
  end
  object Panel2: TPanel [17]
    Left = 386
    Top = 131
    Width = 361
    Height = 169
    BevelOuter = bvNone
    Caption = 'Panel2'
    TabOrder = 9
    object dxBarDockControl1: TdxBarDockControl
      Left = 0
      Top = 0
      Width = 361
      Height = 26
      Align = dalTop
      BarManager = dxBarManager1
    end
    object dbgSDLink: TcxGrid
      Left = 0
      Top = 26
      Width = 361
      Height = 143
      Align = alClient
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      object tvSDLink: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.Insert.Visible = True
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = True
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        DataController.DataSource = dslink
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'CSAMOUNT'
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.Appending = True
        OptionsData.CancelOnExit = False
        OptionsData.Editing = False
        OptionsView.CellEndEllipsis = True
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.GroupByBox = False
        OptionsView.HeaderEndEllipsis = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Header = DMInv.cxSiniyText
        object tvSDLinkSDNAME: TcxGridDBColumn
          Caption = #1053#1072#1079#1074#1072#1085#1080#1077
          DataBinding.FieldName = 'SDNAME'
        end
      end
      object cxGridLevel5: TcxGridLevel
        GridView = tvSDLink
      end
    end
  end
  object lcbOPF: TcxDBLookupComboBox [18]
    Left = 104
    Top = 101
    DataBinding.DataField = 'JLOPFSDID'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Properties.KeyFieldNames = 'SDID'
    Properties.ListColumns = <
      item
        FieldName = 'SDNAME'
      end>
    Properties.ListOptions.ShowHeader = False
    Properties.ListSource = dsSDOPF
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 10
    Width = 97
  end
  object cbFizik: TcxDBCheckBox [19]
    Left = 8
    Top = 48
    Caption = #1060#1080#1079#1083#1080#1094#1086
    DataBinding.DataField = 'JLTYPE'
    DataBinding.DataSource = dlgDS
    ParentFont = False
    Properties.NullStyle = nssUnchecked
    Properties.ValueChecked = 1
    Properties.ValueUnchecked = 0
    Properties.OnChange = cbFizikPropertiesChange
    Style.Font.Charset = DEFAULT_CHARSET
    Style.Font.Color = clWindowText
    Style.Font.Height = -15
    Style.Font.Name = 'Tahoma'
    Style.Font.Style = []
    Style.Shadow = True
    Style.IsFontAssigned = True
    TabOrder = 15
    Width = 89
  end
  inherited dlgDS: TDataSource
    DataSet = qJL
    Left = 120
    Top = 8
  end
  object dxBarManager1: TdxBarManager
    AllowReset = False
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -12
    Font.Name = 'Segoe UI'
    Font.Style = []
    CanCustomize = False
    Categories.Strings = (
      'Default')
    Categories.ItemsVisibles = (
      2)
    Categories.Visibles = (
      True)
    ImageOptions.Images = DMInv.cxSmallImages
    NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
    PopupMenuLinks = <>
    UseSystemFont = True
    Left = 530
    Top = 203
    DockControlHeights = (
      0
      0
      0
      0)
    object dxBarManager1Bar1: TdxBar
      AllowCustomizing = False
      AllowQuickCustomizing = False
      Caption = 'Custom 1'
      CaptionButtons = <>
      DockControl = dxBarDockControl1
      DockedDockControl = dxBarDockControl1
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 539
      FloatTop = 664
      FloatClientWidth = 51
      FloatClientHeight = 22
      ItemLinks = <
        item
          Visible = True
          ItemName = 'dxBarButton1'
        end
        item
          Visible = True
          ItemName = 'dxBarButton2'
        end>
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      UseRestSpace = True
      Visible = True
      WholeRow = False
    end
    object dxBarButton1: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1089#1074#1103#1079#1100
      Visible = ivAlways
      ImageIndex = 57
      OnClick = dxBarButton1Click
    end
    object dxBarButton2: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1089#1074#1103#1079#1100
      Visible = ivAlways
      ImageIndex = 46
      OnClick = dxBarButton2Click
    end
  end
  object qJLSDLink: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qJLSDLinkAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT l.*, sd.SDNAME'
      'FROM JLSDLINK l'
      'INNER JOIN SYS_DIC sd ON sd.SDID = l.SDID'
      'WHERE l.JLID = :JLID')
    UpdateObject = quSDLink
    GeneratorField.Field = 'ID'
    GeneratorField.Generator = 'GEN_JLSDLINK_ID'
    Left = 216
    Top = 357
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'JLID'
        ParamType = ptUnknown
      end>
    object qJLSDLinkID: TIntegerField
      FieldName = 'ID'
      Origin = '"JLSDLINK"."ID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qJLSDLinkJLID: TIntegerField
      FieldName = 'JLID'
      Origin = '"JLSDLINK"."JLID"'
    end
    object qJLSDLinkSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"JLSDLINK"."SDID"'
    end
    object qJLSDLinkSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object quSDLink: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  ID,'
      '  JLID,'
      '  SDID,'
      '  SDNAME'
      'from JLSDLINK '
      'where'
      '  ID = :ID')
    ModifySQL.Strings = (
      'update JLSDLINK'
      'set'
      '  ID = :ID,'
      '  JLID = :JLID,'
      '  SDID = :SDID'
      'where'
      '  ID = :OLD_ID')
    InsertSQL.Strings = (
      'insert into JLSDLINK'
      '  (ID, JLID, SDID)'
      'values'
      '  (:ID, :JLID, :SDID)')
    DeleteSQL.Strings = (
      'delete from JLSDLINK'
      'where'
      '  ID = :OLD_ID')
    Left = 256
    Top = 360
  end
  object dslink: TDataSource
    DataSet = qJLSDLink
    Left = 184
    Top = 356
  end
  object qJL: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    SQL.Strings = (
      'SELECT J.*'
      'FROM JURLITSA J'
      'where J.JLISDELETE is null'
      'and j.jlid = :jlid')
    UpdateObject = quJL
    GeneratorField.Field = 'JLID'
    GeneratorField.Generator = 'GEN_JURLITSA'
    Left = 160
    Top = 8
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'jlid'
        ParamType = ptUnknown
      end>
    object qJLJLID: TIntegerField
      FieldName = 'JLID'
      Origin = '"JURLITSA"."JLID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qJLJLEGALNAME: TIBStringField
      FieldName = 'JLEGALNAME'
      Origin = '"JURLITSA"."JLEGALNAME"'
      Size = 255
    end
    object qJLJLNOTE: TIBStringField
      FieldName = 'JLNOTE'
      Origin = '"JURLITSA"."JLNOTE"'
      Size = 255
    end
    object qJLJLUSERENTER: TIBStringField
      FieldName = 'JLUSERENTER'
      Origin = '"JURLITSA"."JLUSERENTER"'
      Size = 40
    end
    object qJLJLTIMEENTER: TDateTimeField
      FieldName = 'JLTIMEENTER'
      Origin = '"JURLITSA"."JLTIMEENTER"'
    end
    object qJLJLUSEREDIT: TIBStringField
      FieldName = 'JLUSEREDIT'
      Origin = '"JURLITSA"."JLUSEREDIT"'
      Size = 40
    end
    object qJLJLTIMEEDIT: TDateTimeField
      FieldName = 'JLTIMEEDIT'
      Origin = '"JURLITSA"."JLTIMEEDIT"'
    end
    object qJLJLINN: TIBStringField
      FieldName = 'JLINN'
      Origin = '"JURLITSA"."JLINN"'
      Size = 12
    end
    object qJLJLOGRN: TIBStringField
      FieldName = 'JLOGRN'
      Origin = '"JURLITSA"."JLOGRN"'
      Size = 255
    end
    object qJLJLOPF: TIBStringField
      FieldName = 'JLOPF'
      Origin = '"JURLITSA"."JLOPF"'
      Size = 10
    end
    object qJLJLLEGALADRESS: TIBStringField
      FieldName = 'JLLEGALADRESS'
      Origin = '"JURLITSA"."JLLEGALADRESS"'
      Size = 255
    end
    object qJLJLCEONAME: TIBStringField
      FieldName = 'JLCEONAME'
      Origin = '"JURLITSA"."JLCEONAME"'
      Size = 255
    end
    object qJLJLISDELETE: TIntegerField
      FieldName = 'JLISDELETE'
      Origin = '"JURLITSA"."JLISDELETE"'
    end
    object qJLJLOPFSDID: TIntegerField
      FieldName = 'JLOPFSDID'
      Origin = '"JURLITSA"."JLOPFSDID"'
    end
    object qJLJLTYPE: TIntegerField
      FieldName = 'JLTYPE'
      Origin = '"JURLITSA"."JLTYPE"'
    end
    object qJLJLSYMBCODE: TIBStringField
      FieldName = 'JLSYMBCODE'
      Origin = '"JURLITSA"."JLSYMBCODE"'
      Size = 255
    end
  end
  object quJL: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  JLID,'
      '  JLTYPE,'
      '  JLNOTE,'
      '  JLUSERENTER,'
      '  JLTIMEENTER,'
      '  JLUSEREDIT,'
      '  JLTIMEEDIT,'
      '  JLEGALNAME,'
      '  JLSYMBCODE,'
      '  JLINN,'
      '  JLOGRN,'
      '  JLOPF,'
      '  JLOPFSDID,'
      '  JLLEGALADRESS,'
      '  JLCEONAME,'
      '  JLISDELETE'
      'from JURLITSA '
      'where'
      '  JLID = :JLID')
    ModifySQL.Strings = (
      'update JURLITSA'
      'set'
      '  JLCEONAME = :JLCEONAME,'
      '  JLEGALNAME = :JLEGALNAME,'
      '  JLID = :JLID,'
      '  JLINN = :JLINN,'
      '  JLISDELETE = :JLISDELETE,'
      '  JLLEGALADRESS = :JLLEGALADRESS,'
      '  JLNOTE = :JLNOTE,'
      '  JLOGRN = :JLOGRN,'
      '  JLOPF = :JLOPF,'
      '  JLOPFSDID = :JLOPFSDID,'
      '  JLSYMBCODE = :JLSYMBCODE,'
      '  JLTYPE = :JLTYPE'
      'where'
      '  JLID = :OLD_JLID')
    InsertSQL.Strings = (
      'insert into JURLITSA'
      
        '  (JLCEONAME, JLEGALNAME, JLID, JLINN, JLISDELETE, JLLEGALADRESS' +
        ', JLNOTE, '
      '   JLOGRN, JLOPF, JLOPFSDID, JLSYMBCODE, JLTYPE)'
      'values'
      
        '  (:JLCEONAME, :JLEGALNAME, :JLID, :JLINN, :JLISDELETE, :JLLEGAL' +
        'ADRESS, '
      '   :JLNOTE, :JLOGRN, :JLOPF, :JLOPFSDID, :JLSYMBCODE, :JLTYPE)')
    DeleteSQL.Strings = (
      'delete from JURLITSA'
      'where'
      '  JLID = :OLD_JLID')
    Left = 200
    Top = 8
  end
  object dsSDOPF: TDataSource
    DataSet = qSDOPF
    Left = 144
    Top = 72
  end
  object qSDOPF: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.*'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID)'
      '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = 34'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'order by 1')
    GeneratorField.Field = 'SDID'
    Left = 176
    Top = 72
    object qSDOPFSDNAME: TIBStringField
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 255
    end
    object qSDOPFSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qSDOPFSDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
  end
  object qFindLegalName: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT j.*'
      'FROM JURLITSA j'
      'WHERE j.JLISDELETE IS NULL'
      'AND UPPER(j.JLSYMBCODE) CONTAINING UPPER(:symbcode)'
      'AND j.JLID <> :jlid')
    GeneratorField.Field = 'SDID'
    Left = 272
    Top = 80
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'symbcode'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'jlid'
        ParamType = ptUnknown
      end>
  end
  object qFindINN: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT j.*'
      'FROM JURLITSA j'
      'WHERE j.JLISDELETE IS NULL'
      'AND UPPER(j.JLINN) = UPPER(:inn)'
      'AND j.JLID <> :jlid')
    GeneratorField.Field = 'SDID'
    Left = 272
    Top = 120
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'inn'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'jlid'
        ParamType = ptUnknown
      end>
  end
end
